<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('员工基本信息')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body class="gray-bg">
<div class="ui-layout-center">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="user-form">
                    <div class="select-list">
                        <ul>
                            <li>
                                姓名：<input type="text" name="name"/>
                            </li>
                            <li>
                                工号：<input type="text" name="badge"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                        class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                        class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-primary single" onclick="$.operate.edit()">
                    <i class="fa fa-edit"></i> 修改
                </a>
            </div>

            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>

<script th:inline="javascript">
    var prefix = ctx + "bgInfo/basicEmpInfo";
    $(function () {
        var panehHidden = false;
        if ($(this).width() < 800) {
            panehHidden = true;
        }
        $('body').layout({initClosed: panehHidden, west__size: 350});
        queryData();
    });

    function queryData() {
        var columns = [];
        var checkbox = {checkbox: true};
        var badge = {field: 'badge', title: '工号'};
        var name = {field: 'name', title: '姓名'};
        var compName = {field: 'compName', title: '公司名称'};
        var depName = {field: 'depName', title: '部门名称'};
        var jobName = {field: 'jobName', title: '工作岗位'};
        var JoinTypeTitle = {field: 'JoinTypeTitle', title: '入职渠道'};
        var JoinDate = {field: 'JoinDate', title: '入职日期'};
        var ReportToTitle = {field: 'ReportToTitle', title: '直接上级'};
        var WFReportToTitle = {field: 'WFReportToTitle', title: '职能上级'};
        var empStatusName = {field: 'empStatusName', title: '员工状态'};
        var empTypeName = {field: 'empTypeName', title: '员工类别'};
        var WorkCity = {field: 'WorkCity', title: '工作城市'};
        var CyearAdjust = {field: 'CyearAdjust', title: '司龄调整'};
        var JobBeginDate = {field: 'JobBeginDate', title: '从岗日期'};
        var WorkBeginDate = {field: 'WorkBeginDate', title: '参加工作时间'};
        var PracBeginDate = {field: 'PracBeginDate', title: '实习开始日期'};
        var PracTerm = {field: 'PracTerm', title: '实习期'};
        var PracEndDate = {field: 'PracEndDate', title: '实习结束日期'};
        var ProbBeginDate = {field: 'ProbBeginDate', title: '试用开始日期'};
        var ProbTerm = {field: 'ProbTerm', title: '试用期'};
        var ProbEndDate = {field: 'ProbEndDate', title: '试用结束日期'};
        var conCount = {field: 'conCount', title: '合同次数'};
        var ContractTitle = {field: 'ContractTitle', title: '合同签约单位'};
        var ConTypeTitle = {field: 'ConTypeTitle', title: '合同类型'};
        var ConNo = {field: 'ConNo', title: '合同编号'};
        var ConPropertyTitle = {field: 'ConPropertyTitle', title: '合同属性'};
        var ConBeginDate = {field: 'ConBeginDate', title: '合同开始日期'};
        var ConTerm = {field: 'ConTerm', title: '合同期'};
        var ConEndDate = {field: 'ConEndDate', title: '合同结束日期'};
        var CountryTitle = {field: 'CountryTitle', title: '国籍'};
        var CertTypeTitle = {field: 'CertTypeTitle', title: '证件类型'};
        var CertNo = {field: 'CertNo', title: '证件编号'};
        var GenderTitle = {field: 'GenderTitle', title: '性别'};
        var BirthDay = {field: 'BirthDay', title: '出生日期'};
        var archiveid = {field: 'archiveid', title: '档案号'};
        var remark = {field: 'remark', title: '备注'};

        columns.push(checkbox,badge,name,compName,depName,jobName,JoinTypeTitle,JoinDate,ReportToTitle);
        columns.push(WFReportToTitle,empStatusName,empTypeName,WorkCity,CyearAdjust,JobBeginDate,WorkBeginDate);
        columns.push(PracBeginDate,PracTerm,PracEndDate,ProbBeginDate,ProbTerm,ProbEndDate,conCount,ContractTitle);
        columns.push(ConTypeTitle,ConNo,ConPropertyTitle,ConBeginDate,ConTerm,ConEndDate,CountryTitle,CertTypeTitle);
        columns.push(CertNo,GenderTitle,BirthDay,archiveid,remark);

        var options = {
            uniqueId: "eid",
            url: prefix + "/findDataList",
            createUrl: prefix + "/addEmp",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            detailUrl: prefix + "/detail/{id}",
            escape: true,
            showPageGo: true,
            rememberSelected: true,
            height: $(window).height() - 120,
            sortOrder: "desc",
            modalName: "合同续签登记",
            columns: columns
        };
        $.table.init(options);
    }


</script>
</body>
</html>